<?php
$menu_items = array(
	'Artist Logins'		=> 'artists',
	'Featured Artists'	=> 'featuredartist',
	'Logout'			=> 'logout'
);

function addListItems( &$arr, &$items, $current = null){
	foreach($items as $k => $v){
		if( !is_array($v) ){
			$attrs = array();
			if( $current && $v == $current){
				$attrs['class'] = 'active';
			}
			$arr[$k] = anchor(base_url() . CMF_PREFIX . "$v", $k, $attrs);
			unset($attrs);
		}else{
			$arr[$k] = array();
			addListItems( $arr[$k], $v, $current);
		}
	}
}

$table = isset($table)?$table:null;
$list_items = array();
addListItems($list_items, $menu_items, $table);

$class = isset($options['class'])?$options['class']:'menu';
$table_name = isset($table_name)?$table_name:null;
echo $this->html->ul($list_items, array('class' => $class), 0);
?>